1. Field of the Invention
The present invention relates to a rule base processing system wherein rules are described in a rule base by a rule description language, and more particularly, to a rule base processing system in which rules in the rule base are provided in knowledge source blocks of rules between which the sequence of priority for execution can be changed. A control block is provided for controlling execution of the knowledge source blocks. The rule base processing system can be structured as a subsystem created by providing the control block with a function name. Finally, the rules may be provided with a number of rules from which an optimum rule is selected for a particular application.
2. Description of the Related Art
A rule base processing system is one way of realizing an expert system. An example of such a complied rule base processing system is ESHELL, described, for example, on page 1078 of the Information Processing Handbook, May 30, 1989 and available from Fujitsu, Inc. of Japan. To solve a problem with such a system, knowledge in the expert system is stored in the rule base as rules that can be sequentially called by the inference engine for execution. Rule base processing systems are beginning to be used practically in various fields, such as LSI circuit design, medical diagnosis, tax planning and money related consultation, etc. Namely, such systems are designed so that human knowledge can be input, as rules, into a computer system, and decisions made by the computer system.
In a conventional rule base processing system a rule base is formed by combining a number of rules described in a rule description language. Each rule has a condition section and a procedure section. For example, in designing an electrical circuit, a description of a rule in the language would be made as follows:
In the condition section: "IF A*B" PA1 In the procedure section: "THEN select AND circuit".
In conventional rule base processing, the conditions in the condition section are evaluated sequentially starting with the first rule in the rule base. When the condition exists, the corresponding procedure is executed. A rule base system is commonly employed in programs for structuring or designing systems through trial and error. However, such an application has been difficult to accomplish using a general purpose computer language, which mainly consists of conventional algorithms for solving problems. For this reason, a rule base system has initially been written using a processing language having an interpreter, such as LISP, as the core. This is because it is difficult to describe a rule conforming to a suitable grammar and then process it with a compiler type language. In other words, a language which must be compiled is typically not suitable for the description of rules.
However, when an interpreter language such as LISP is used, because processing speed is low and a large memory area is used, it has been impractical to design a large system, such as an integrated circuit. For this reason, a rule base system using a compiler language has been developed.
In a compiler rule base system, a rule base source, similar to a source program in a language such as Fortran, is described by a rule description language suitable for description of expert rules such as LISP. The inference engine is programmed, for example, in a compiler language such as the C language. The rule base source is first translated into the base language, in this case, into the C language by the rule base compiler and a source program is generated. The rule base system (executable program) is compiled with the inference engine program with respective compilers and combined.
However, structuring of the conventional compiler rule base system described above includes several problems. The conventional rule base description system obtains control information, such as the knowledge source list required by the inference engine, by retrieving it as a whole at the time of translation of the rule base source. Therefore, the rule base source language must be a single file. Accordingly, it is difficult to compile a large scale rule base, for example, one exceeding several tens of thousands of rules, and maintain the rule base.
In a system for processing large problems such as the composition and design of electronic circuits, an improvement has been suggested in which the rule base processing system would be employed only for a part of the design process, and high speed algorithmic processing would provide the remainder. However, it is difficult to realize this combination in a conventional rule base system because the rule base itself is the main program in the system.
Another problem is that optimum processing, for example, for designing circuits, is sometimes required to satisfy contradictory conditions in a designer's request, for example, the scale of the circuit must be as small as possible, and delay time of the circuit must be minimized. However, since the priority of rule execution in the knowledge source of the conventional rule base is already determined, and thereby fixed, it is impossible to generate a knowledge base which simultaneously satisfies both of these conditions.
Further, a rule in the conventional rule base generally employs the format, "if . . . , conduct . . . ". In a case where m rules exist in an n rule base specifically for minimization of electronic circuits and other rules exist for other applications, it is best to select the most effective rules for improvement in the quality of the electronic circuits to be generated. The general format of the rules as explained above cannot satisfy this requirement because the first rule that satisfies the condition whether or not it is the best rule is executed. The conventional method requires a process either for generating a rule base where the arrangement sequence of the rules is different for each application condition, or for generating a rule where an application condition test is added to the condition part of the rule. In either of these two solutions, the rule base becomes large and the structure becomes complicated, lowering the development efficiency.